{{template "../public/page_header.html" .}}

<div class="container-fluid">
    <div class="row">
        <div class="panel panel-default">
            <div class="panel-heading">
                编辑角色
            </div>
            <div class="panel-body">
                <div class="table-responsive input-form">
                    <form action="/{{config "String" "adminPath" ""}}/menu/goedit" method="post">
                        <ul>
                            <input type="hidden" name="id" value="{{.menu.Id}}">
                            <input type="hidden" name="prevPage" value="{{.prevPage}}">
                            <li><span>导航名称:</span> <input type="text" name="title" value="{{.menu.Title}}"/></li>
                            <li><span>导航位置: </span>
                            {{$position := .menu.Position}}
                                <select name="position" id="position">
                                    <option value="1" {{if eq $position 1}}selected{{end}}>顶部</option>
                                    <option value="2" {{if eq $position 2}}selected{{end}}>中间</option>
                                    <option value="3" {{if eq $position 3}}selected{{end}}>底部</option>
                                </select>
                            </li>
                            <li><span>关联商品:</span> <input type="text" name="relation" class="input"
                                                          value="{{.menu.Relation}}"/></li>
                            <li><span>导航链接地址:</span> <input type="text" name="link" value="{{.menu.Link}}"/></li>
                            <li><span>新窗口打开: </span>
                            {{$isOpennew := .menu.IsOpennew}}
                                <select name="is_opennew" id="is_opennew">
                                    <option {{if eq $isOpennew 1}}selected{{end}} value="1">否</option>
                                    <option {{if eq $isOpennew 2}}selected{{end}} value="2">是</option>
                                </select>
                            <li><span>排序:</span> <input type="text" name="sort" value="10" value="{{.menu.Sort}}"/></li>
                            <li> 状　　态:
                                <input type="radio" name="status"
                                       {{if eq .menu.Status 1}}checked{{end}} value="1" id="a"/> <label
                                        for="a">显示</label>
                                <input type="radio" name="status"
                                       {{if eq .menu.Status 0}}checked{{end}} value="0" id="b"/><label
                                        for="b">隐藏</label>
                            </li>
                            <br/>
                            <button type="submit" class="btn btn-primary">提交</button>
                            </li>
                        </ul>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>